package com.huawei.result;


import com.huawei.result.ResultOperation;
import com.huawei.result.Result;

/**
 * @program: playgame
 * @Description:
 * @author: crr
 * @date: 2022/4/20
 */
public class ResultOperationImpl implements ResultOperation {
    /**
     * @Description: 人机对战-人胜
     * @Param: []
     * @return: com.huawei.pojo.Result
     * @Author: crr
     * @Date: 2022/4/20
     */
    @Override
    public Result rockPaperScissorsByPersonWin() {
        Result result = new Result();
        result.setUserWin(result.getUserWin() + 1);
        result.setComputerLosses(result.getComputerLosses() + 1);
        return result;
    }

    /**
     * @Description: 人机对战-电脑胜
     * @Param: []
     * @return: com.huawei.pojo.Result
     * @Author: crr
     * @Date: 2022/4/20
     */
    @Override
    public Result rockPaperScissorsByComputerWin() {
        Result result = new Result();
        result.setUserLosses(result.getUserWin() + 1);
        result.setComputerWin(result.getComputerLosses() + 1);
        return result;
    }

    /**
     * @Description: 人机对战-平
     * @Param: []
     * @return: com.huawei.pojo.Result
     * @Author: crr
     * @Date: 2022/4/20
     */
    @Override
    public Result rockPaperScissorsByPersonAndComputerDraws() {
        Result result = new Result();
        result.setUserDraws(result.getUserDraws() + 1);
        result.setComputerDraws(result.getComputerDraws() + 1);
        return result;
    }
}
